package pri.damai.xiaowu.common.core.util;

import lombok.extern.slf4j.Slf4j;

import javax.crypto.*;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

/**
 * 时间转化工具
 * @Desc
 * @Author DaMai
 * @Date 2021/5/11 16:36
 * 但行好事，莫问前程。
 */
@Slf4j
public class AESUtils {

    /**
     * 偏移量字符串必须是16位 当模式是CBC的时候必须设置偏移量
     */
    private String Algorithm = "AES";
    private String iv = "0123456789ABCDEF";
    /**
     * 算法/模式/补码方式
     */
    private String AlgorithmProvider = "AES/ECB/PKCS5Padding";
    /**
     * 秘钥 5beead559ace53edc3e28449f8cfcf98
     */
    private byte[] secturyKey;

    public void setSecturyKey(byte[] secturyKey) {
        this.secturyKey = secturyKey;
    }

    /**
     * 获取一个随机的密钥
     * @apiNote [附加描述]
     * @return java.lang.String 密钥的十六进制字符
     * @author DaMai
     * @date 2021/10/21 16:05
     */
    public String getHexStrRandomKey() throws Exception {
        return byteToHexString(generatorKey());
    }

    /**
     * 加密
     * @apiNote [附加描述]
     * @param content 明文
     * @param hexKeyStr 密钥的十六进制字符
     * @return java.lang.String
     * @author DaMai
     * @date 2021/10/21 16:09
     */
    public String simpleEncrypt(String content, String hexKeyStr) {

        byte[] keyBytes = hexStringToBytes(hexKeyStr);

        byte[] encryptBytes = null;
        try {
            encryptBytes = encrypt(content, keyBytes);
        } catch (Exception e) {
            log.error("AES加密错误。", e);
            throw new RuntimeException("AES加密错误。", e);
        }

        return byteToHexString(encryptBytes);
    }

    /**
     * 解密
     * @apiNote [附加描述]
     * @param encryptContent 密文
     * @param hexKeyStr 密钥的十六进制字符
     * @return java.lang.String
     * @author DaMai
     * @date 2021/10/21 16:51
     */
    public String simpleDecrypt(String encryptContent, String hexKeyStr) {

        byte[] keyBytes = hexStringToBytes(hexKeyStr);

        byte[] encryptBytes = null;
        try {
            encryptBytes = decrypt(encryptContent, keyBytes);
        } catch (Exception e) {
            log.error("AES解密错误。", e);
            throw new RuntimeException("AES解密错误。", e);
        }

        return new String(encryptBytes, StandardCharsets.UTF_8);
    }


    public byte[] generatorKey() throws NoSuchAlgorithmException {
        KeyGenerator keyGenerator = KeyGenerator.getInstance(Algorithm);
        //默认128，获得无政策权限后可为192或256
        keyGenerator.init(128);
        SecretKey secretKey = keyGenerator.generateKey();
        return secretKey.getEncoded();
    }

    /**
     * 加密
     * @param src
     * @param key
     * @return
     * @throws NoSuchAlgorithmException
     * @throws NoSuchPaddingException
     * @throws InvalidKeyException
     * @throws IllegalBlockSizeException
     * @throws BadPaddingException
     * @throws UnsupportedEncodingException
     * @throws InvalidAlgorithmParameterException
     */
    public byte[] encrypt(String src, byte[] key) throws NoSuchAlgorithmException, NoSuchPaddingException,
            InvalidKeyException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException, InvalidAlgorithmParameterException {
        if (null == key || key.length == 0) {
            key = secturyKey;
        }
        SecretKey secretKey = new SecretKeySpec(key, Algorithm);
        Cipher cipher = Cipher.getInstance(AlgorithmProvider);
        cipher.init(Cipher.ENCRYPT_MODE, secretKey);
        byte[] cipherBytes = cipher.doFinal(src.getBytes(StandardCharsets.UTF_8));
        return cipherBytes;
    }

    /**
     * 解密
     * @param src
     * @param key
     * @return
     * @throws Exception
     */
    public byte[] decrypt(String src, byte[] key) throws Exception {
        if (null == key || key.length == 0) {
            key = secturyKey;
        }
        SecretKey secretKey = new SecretKeySpec(key, Algorithm);
        Cipher cipher = Cipher.getInstance(AlgorithmProvider);
        cipher.init(Cipher.DECRYPT_MODE, secretKey);
        byte[] hexBytes = hexStringToBytes(src);
        byte[] plainBytes = cipher.doFinal(hexBytes);
        return plainBytes;
    }

    /**
     * 将byte转换为16进制字符串
     * @param src
     * @return
     */
    public static String byteToHexString(byte[] src) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < src.length; i++) {
            int v = src[i] & 0xff;
            String hv = Integer.toHexString(v);
            if (hv.length() < 2) {
                sb.append("0");
            }
            sb.append(hv);
        }
        return sb.toString();
    }

    /**
     * 将16进制字符串装换为byte数组
     *
     * @param hexString
     * @return
     */
    public static byte[] hexStringToBytes(String hexString) {
        hexString = hexString.toUpperCase();
        int length = hexString.length() / 2;
        char[] hexChars = hexString.toCharArray();
        byte[] b = new byte[length];
        for (int i = 0; i < length; i++) {
            int pos = i * 2;
            b[i] = (byte) (charToByte(hexChars[pos]) << 4 | charToByte(hexChars[pos + 1]));
        }
        return b;
    }

    /**
     * 字符转byte
     * @param c
     * @return
     */
    private static byte charToByte(char c) {
        return (byte) "0123456789ABCDEF".indexOf(c);
    }

    public static void main(String[] args) throws Exception {
        //String hexStrKey = getHexStrRandomKey();

        AESUtils aesUtils = new AESUtils();
        System.out.println(aesUtils.getHexStrRandomKey());
//        String content = "{\"bidOpenTime\":\"2021-12-14T00:00:00\",\"expertPrintVOList\":[{\"certificateNo\":\"413028197302142512\",\"expertId\":879240227,\"expertName\":\"郑黎\",\"groupName\":\"测试-3\",\"idCardNo\":\"A013430\",\"validCode\":\"980026\"},{\"certificateNo\":\"410103196512112419\",\"expertId\":879239824,\"expertName\":\"柳宏川\",\"groupName\":\"测试-3\",\"idCardNo\":\"A237310\",\"validCode\":\"151076\"},{\"certificateNo\":\"410105196906200043\",\"expertId\":879231478,\"expertName\":\"夏国英\",\"groupName\":\"测试-3\",\"idCardNo\":\"A181011\",\"validCode\":\"814881\"},{\"certificateNo\":\"410724196711010524\",\"expertId\":879239920,\"expertName\":\"杨爱民\",\"groupName\":\"测试-1\",\"idCardNo\":\"G235261\",\"validCode\":\"549618\"},{\"certificateNo\":\"41110219660324055x\",\"expertId\":879248531,\"expertName\":\"谢耀欣\",\"groupName\":\"测试-1\",\"idCardNo\":\"L128610\",\"validCode\":\"599341\"},{\"certificateNo\":\"41282919770226004x\",\"expertId\":879223869,\"expertName\":\"熊海伦\",\"groupName\":\"测试-1\",\"idCardNo\":\"Q230261\",\"validCode\":\"400116\"},{\"certificateNo\":\"41052619740424233X\",\"expertId\":879247540,\"expertName\":\"赵长伟\",\"groupName\":\"测试-3\",\"idCardNo\":\"E094350\",\"validCode\":\"899421\"},{\"certificateNo\":\"410105196206232722\",\"expertId\":879252428,\"expertName\":\"张达瑾\",\"groupName\":\"测试-3\",\"idCardNo\":\"A007551\",\"validCode\":\"910239\"},{\"certificateNo\":\"320382197808076233\",\"expertId\":879232310,\"expertName\":\"唐成\",\"groupName\":\"测试-3\",\"idCardNo\":\"A187670\",\"validCode\":\"252258\"},{\"certificateNo\":\"410105195710160540\",\"expertId\":879243494,\"expertName\":\"陈卫航\",\"groupName\":\"测试-4\",\"idCardNo\":\"A060061\",\"validCode\":\"113622\"},{\"certificateNo\":\"410621197208075021\",\"expertId\":879219088,\"expertName\":\"李彥红\",\"groupName\":\"测试-5\",\"idCardNo\":\"J028771\",\"validCode\":\"768425\"},{\"certificateNo\":\"412702197709024212\",\"expertId\":879232062,\"expertName\":\"高有斌\",\"groupName\":\"测试-5\",\"idCardNo\":\"A185850\",\"validCode\":\"576823\"},{\"certificateNo\":\"410103197002147077\",\"expertId\":879252052,\"expertName\":\"韩合轩\",\"groupName\":\"测试-5\",\"idCardNo\":\"A003150\",\"validCode\":\"353659\"},{\"certificateNo\":\"410826196811094022\",\"expertId\":879252667,\"expertName\":\"张晖\",\"groupName\":\"测试-5\",\"idCardNo\":\"A009341\",\"validCode\":\"478674\"},{\"certificateNo\":\"41030219631103253X\",\"expertId\":879240453,\"expertName\":\"潘利武\",\"groupName\":\"测试-7\",\"idCardNo\":\"C041500\",\"validCode\":\"265074\"},{\"certificateNo\":\"411302197410240014\",\"expertId\":879231723,\"expertName\":\"张来福\",\"groupName\":\"测试-7\",\"idCardNo\":\"R182120\",\"validCode\":\"640871\"},{\"certificateNo\":\"410103196210111330\",\"expertId\":879246052,\"expertName\":\"马明林\",\"groupName\":\"测试-7\",\"idCardNo\":\"A077860\",\"validCode\":\"492164\"},{\"certificateNo\":\"410425198202254087\",\"expertId\":879219013,\"expertName\":\"李利霞\",\"groupName\":\"测试-7\",\"idCardNo\":\"A016961\",\"validCode\":\"288325\"},{\"certificateNo\":\"410804196209060040\",\"expertId\":879220578,\"expertName\":\"闪海燕\",\"groupName\":\"测试-7\",\"idCardNo\":\"H035541\",\"validCode\":\"560048\"},{\"certificateNo\":\"410103196906041326\",\"expertId\":879232461,\"expertName\":\"宋韶敏\",\"groupName\":\"测试-7\",\"idCardNo\":\"A193011\",\"validCode\":\"012376\"},{\"certificateNo\":\"410303196407130528\",\"expertId\":879225440,\"expertName\":\"陈予宏\",\"groupName\":\"测试-7\",\"idCardNo\":\"C253041\",\"validCode\":\"659623\"},{\"certificateNo\":\"410511197004020637\",\"expertId\":879246938,\"expertName\":\"王新芳\",\"groupName\":\"测试-7\",\"idCardNo\":\"E082860\",\"validCode\":\"527883\"},{\"certificateNo\":\"412901197506053552\",\"expertId\":879229072,\"expertName\":\"董勇\",\"groupName\":\"测试-7\",\"idCardNo\":\"A156930\",\"validCode\":\"876313\"},{\"certificateNo\":\"410103197505052475\",\"expertId\":879232335,\"expertName\":\"高红涛\",\"groupName\":\"测试-8\",\"idCardNo\":\"A210200\",\"validCode\":\"113293\"},{\"certificateNo\":\"41090119671216082X\",\"expertId\":879230923,\"expertName\":\"李粉玲\",\"groupName\":\"测试-8\",\"idCardNo\":\"J174391\",\"validCode\":\"647251\"},{\"certificateNo\":\"410103197612242450\",\"expertId\":879219182,\"expertName\":\"刘剑\",\"groupName\":\"测试-8\",\"idCardNo\":\"Q069340\",\"validCode\":\"712983\"},{\"certificateNo\":\"410203196712011538\",\"expertId\":879246481,\"expertName\":\"金戟\",\"groupName\":\"测试-8\",\"idCardNo\":\"B089530\",\"validCode\":\"993792\"},{\"certificateNo\":\"413024197611015415\",\"expertId\":879234943,\"expertName\":\"李万友\",\"groupName\":\"测试-8\",\"idCardNo\":\"A273580\",\"validCode\":\"402707\"},{\"certificateNo\":\"410503196802152031\",\"expertId\":879244212,\"expertName\":\"郭庆亮\",\"groupName\":\"测试-8\",\"idCardNo\":\"E069760\",\"validCode\":\"898046\"},{\"certificateNo\":\"412701197010150534\",\"expertId\":879250479,\"expertName\":\"武二伟\",\"groupName\":\"测试-8\",\"idCardNo\":\"P128120\",\"validCode\":\"587210\"},{\"certificateNo\":\"412724198006301810\",\"expertId\":879232046,\"expertName\":\"郑新铭\",\"groupName\":\"测试-8\",\"idCardNo\":\"A186060\",\"validCode\":\"918694\"},{\"certificateNo\":\"410901197708290562\",\"expertId\":879247009,\"expertName\":\"于慧青\",\"groupName\":\"测试-10\",\"idCardNo\":\"J086541\",\"validCode\":\"916425\"},{\"certificateNo\":\"410526197106130049\",\"expertId\":879222405,\"expertName\":\"冯海燕\",\"groupName\":\"测试-10\",\"idCardNo\":\"E045261\",\"validCode\":\"589267\"},{\"certificateNo\":\"410621197511245513\",\"expertId\":879249070,\"expertName\":\"秦学兵\",\"groupName\":\"测试-10\",\"idCardNo\":\"F115610\",\"validCode\":\"457539\"},{\"certificateNo\":\"41108119720120602x\",\"expertId\":879243966,\"expertName\":\"杨爱敏\",\"groupName\":\"测试-10\",\"idCardNo\":\"K062121\",\"validCode\":\"588880\"},{\"certificateNo\":\"410105196411151024\",\"expertId\":879220756,\"expertName\":\"孟小宏\",\"groupName\":\"测试-10\",\"idCardNo\":\"A027891\",\"validCode\":\"445365\"},{\"certificateNo\":\"412701196810150562\",\"expertId\":879229486,\"expertName\":\"张灿\",\"groupName\":\"测试-111\",\"idCardNo\":\"P164271\",\"validCode\":\"048878\"},{\"certificateNo\":\"410204198501206015\",\"expertId\":879226010,\"expertName\":\"罗宁\",\"groupName\":\"测试-111\",\"idCardNo\":\"A265870\",\"validCode\":\"110448\"},{\"certificateNo\":\"410802196807072030\",\"expertId\":879245598,\"expertName\":\"辛长永\",\"groupName\":\"测试-111\",\"idCardNo\":\"H070200\",\"validCode\":\"850790\"},{\"certificateNo\":\"410928197411102743\",\"expertId\":879241169,\"expertName\":\"刘瑞玲\",\"groupName\":\"测试-111\",\"idCardNo\":\"J047561\",\"validCode\":\"724497\"},{\"certificateNo\":\"412301197601014620\",\"expertId\":879229964,\"expertName\":\"乔颖慧\",\"groupName\":\"测试-111\",\"idCardNo\":\"N165511\",\"validCode\":\"106555\"},{\"certificateNo\":\"410123197302055057\",\"expertId\":879221003,\"expertName\":\"邢少春\",\"groupName\":\"测试-111\",\"idCardNo\":\"A054910\",\"validCode\":\"990992\"},{\"certificateNo\":\"41088219801219801X\",\"expertId\":879232505,\"expertName\":\"刘立\",\"groupName\":\"测试-144\",\"idCardNo\":\"A189300\",\"validCode\":\"846464\"},{\"certificateNo\":\"410504197311152521\",\"expertId\":879238991,\"expertName\":\"朱冬梅\",\"groupName\":\"测试-144\",\"idCardNo\":\"A263271\",\"validCode\":\"585752\"},{\"certificateNo\":\"410502198204251040\",\"expertId\":879235228,\"expertName\":\"郭琳\",\"groupName\":\"测试-144\",\"idCardNo\":\"E280141\",\"validCode\":\"443184\"},{\"certificateNo\":\"410504197201020026\",\"expertId\":879240230,\"expertName\":\"申洁\",\"groupName\":\"测试-144\",\"idCardNo\":\"E011841\",\"validCode\":\"594252\"},{\"certificateNo\":\"412924197210025020\",\"expertId\":879246000,\"expertName\":\"李成华\",\"groupName\":\"测试-144\",\"idCardNo\":\"G074041\",\"validCode\":\"853887\"},{\"certificateNo\":\"41072419740908202X\",\"expertId\":879222501,\"expertName\":\"樊风霞\",\"groupName\":\"测试-144\",\"idCardNo\":\"G052391\",\"validCode\":\"814315\"},{\"certificateNo\":\"410327197211059657\",\"expertId\":879232925,\"expertName\":\"霍建学\",\"groupName\":\"测试-144\",\"idCardNo\":\"E239710\",\"validCode\":\"107217\"},{\"certificateNo\":\"41050419741011052X\",\"expertId\":879239289,\"expertName\":\"杨雪冰\",\"groupName\":\"测试-144\",\"idCardNo\":\"J231531\",\"validCode\":\"070668\"},{\"certificateNo\":\"412925197908283212\",\"expertId\":879219188,\"expertName\":\"黄晓兵\",\"groupName\":\"测试-144\",\"idCardNo\":\"A124160\",\"validCode\":\"710318\"},{\"certificateNo\":\"412801196610030019\",\"expertId\":879239375,\"expertName\":\"陈留伟\",\"groupName\":\"测试-144\",\"idCardNo\":\"Q232430\",\"validCode\":\"681899\"},{\"certificateNo\":\"410823197809079312\",\"expertId\":879247216,\"expertName\":\"郑战明\",\"groupName\":\"测试-144\",\"idCardNo\":\"H096660\",\"validCode\":\"286198\"},{\"certificateNo\":\"410403196311120021\",\"expertId\":879221733,\"expertName\":\"黄文丽\",\"groupName\":\"测试-144\",\"idCardNo\":\"D054491\",\"validCode\":\"657656\"},{\"certificateNo\":\"41010319630221322X\",\"expertId\":879232198,\"expertName\":\"龚爱菊\",\"groupName\":\"测试-144\",\"idCardNo\":\"A209201\",\"validCode\":\"848577\"},{\"certificateNo\":\"411102197810262035\",\"expertId\":879242034,\"expertName\":\"宋彦鑫\",\"groupName\":\"测试-144\",\"idCardNo\":\"L090110\",\"validCode\":\"137808\"},{\"certificateNo\":\"410702196508252036\",\"expertId\":879222114,\"expertName\":\"陈向安\",\"groupName\":\"测试-144\",\"idCardNo\":\"G060540\",\"validCode\":\"076465\"},{\"certificateNo\":\"410105197109202761\",\"expertId\":879240597,\"expertName\":\"耿玉华\",\"groupName\":\"测试-144\",\"idCardNo\":\"P101831\",\"validCode\":\"806826\"},{\"certificateNo\":\"41010519730801101X\",\"expertId\":879219282,\"expertName\":\"武建军\",\"groupName\":\"测试-144\",\"idCardNo\":\"A021410\",\"validCode\":\"776818\"},{\"certificateNo\":\"410603195601131016\",\"expertId\":879249970,\"expertName\":\"朱国安\",\"groupName\":\"测试-144\",\"idCardNo\":\"F126740\",\"validCode\":\"471241\"},{\"certificateNo\":\"410826197310203539\",\"expertId\":879241109,\"expertName\":\"王利军\",\"groupName\":\"测试-144\",\"idCardNo\":\"H087770\",\"validCode\":\"881750\"},{\"certificateNo\":\"410305197407060029\",\"expertId\":879250600,\"expertName\":\"刘小利\",\"groupName\":\"测试-144\",\"idCardNo\":\"C129251\",\"validCode\":\"882360\"},{\"certificateNo\":\"413024197510100047\",\"expertId\":879234743,\"expertName\":\"严辉\",\"groupName\":\"测试-100\",\"idCardNo\":\"S282451\",\"validCode\":\"643742\"},{\"certificateNo\":\"410105197012184421\",\"expertId\":879234621,\"expertName\":\"渠艳萍\",\"groupName\":\"测试-100\",\"idCardNo\":\"A281161\",\"validCode\":\"343134\"},{\"certificateNo\":\"410204198407131029\",\"expertId\":879234366,\"expertName\":\"黄思井\",\"groupName\":\"测试-100\",\"idCardNo\":\"A266851\",\"validCode\":\"127807\"},{\"certificateNo\":\"410103197410022476\",\"expertId\":879233513,\"expertName\":\"陈兴良\",\"groupName\":\"测试-100\",\"idCardNo\":\"A248240\",\"validCode\":\"430120\"},{\"certificateNo\":\"410503197810091536\",\"expertId\":879224592,\"expertName\":\"梁冬\",\"groupName\":\"测试-100\",\"idCardNo\":\"E264810\",\"validCode\":\"491103\"},{\"certificateNo\":\"220104197708254115\",\"expertId\":879250115,\"expertName\":\"刘栋军\",\"groupName\":\"测试-100\",\"idCardNo\":\"F124990\",\"validCode\":\"877611\"},{\"certificateNo\":\"410901198305214017\",\"expertId\":879227212,\"expertName\":\"韩经绰\",\"groupName\":\"测试-100\",\"idCardNo\":\"J289140\",\"validCode\":\"017985\"},{\"certificateNo\":\"410423198409294016\",\"expertId\":879228342,\"expertName\":\"张江涛\",\"groupName\":\"测试-100\",\"idCardNo\":\"D150350\",\"validCode\":\"308432\"},{\"certificateNo\":\"410181198411131512\",\"expertId\":879235090,\"expertName\":\"张跃辉\",\"groupName\":\"测试-100\",\"idCardNo\":\"A283480\",\"validCode\":\"468331\"},{\"certificateNo\":\"410121197409231011\",\"expertId\":879246355,\"expertName\":\"李希冉\",\"groupName\":\"测试-1000\",\"idCardNo\":\"A104090\",\"validCode\":\"562408\"},{\"certificateNo\":\"410221197611133015\",\"expertId\":879250882,\"expertName\":\"张立功\",\"groupName\":\"测试-1000\",\"idCardNo\":\"A132140\",\"validCode\":\"767634\"},{\"certificateNo\":\"41270219790713421X\",\"expertId\":879230077,\"expertName\":\"王文飞\",\"groupName\":\"测试-1000\",\"idCardNo\":\"A224540\",\"validCode\":\"736557\"},{\"certificateNo\":\"330106196801070517\",\"expertId\":879230767,\"expertName\":\"李勇\",\"groupName\":\"测试-1000\",\"idCardNo\":\"A172830\",\"validCode\":\"991007\"},{\"certificateNo\":\"411102196305260018\",\"expertId\":879219140,\"expertName\":\"霍林\",\"groupName\":\"测试-1000\",\"idCardNo\":\"L017620\",\"validCode\":\"705504\"},{\"certificateNo\":\"410482198503199314\",\"expertId\":879234369,\"expertName\":\"户照国\",\"groupName\":\"测试-1000\",\"idCardNo\":\"D266350\",\"validCode\":\"796956\"},{\"certificateNo\":\"410412195612101029\",\"expertId\":879252324,\"expertName\":\"郭淑莉\",\"groupName\":\"测试-1000\",\"idCardNo\":\"A004881\",\"validCode\":\"738474\"},{\"certificateNo\":\"410105196606012745\",\"expertId\":879237170,\"expertName\":\"秦晓丽\",\"groupName\":\"测试-1000\",\"idCardNo\":\"R204751\",\"validCode\":\"888346\"},{\"certificateNo\":\"410105196511102879\",\"expertId\":879224503,\"expertName\":\"孔德平\",\"groupName\":\"NB组\",\"idCardNo\":\"A239130\",\"validCode\":\"280549\"},{\"certificateNo\":\"412821197407220044\",\"expertId\":879233748,\"expertName\":\"林海燕\",\"groupName\":\"NB组\",\"idCardNo\":\"Q256631\",\"validCode\":\"361594\"},{\"certificateNo\":\"410411198208225537\",\"expertId\":879224765,\"expertName\":\"马前发\",\"groupName\":\"NB组\",\"idCardNo\":\"E253820\",\"validCode\":\"538841\"},{\"certificateNo\":\"410225198605210010\",\"expertId\":879238828,\"expertName\":\"冯伯虎\",\"groupName\":\"NB组\",\"idCardNo\":\"A221460\",\"validCode\":\"648373\"}],\"expertValidCode\":[\"980026\",\"151076\",\"814881\",\"549618\",\"599341\",\"400116\",\"899421\",\"910239\",\"252258\",\"113622\",\"768425\",\"576823\",\"353659\",\"478674\",\"265074\",\"640871\",\"492164\",\"288325\",\"560048\",\"012376\",\"659623\",\"527883\",\"876313\",\"113293\",\"647251\",\"712983\",\"993792\",\"402707\",\"898046\",\"587210\",\"918694\",\"916425\",\"589267\",\"457539\",\"588880\",\"445365\",\"048878\",\"110448\",\"850790\",\"724497\",\"106555\",\"990992\",\"846464\",\"585752\",\"443184\",\"594252\",\"853887\",\"814315\",\"107217\",\"070668\",\"710318\",\"681899\",\"286198\",\"657656\",\"848577\",\"137808\",\"076465\",\"806826\",\"776818\",\"471241\",\"881750\",\"882360\",\"643742\",\"343134\",\"127807\",\"430120\",\"491103\",\"877611\",\"017985\",\"308432\",\"468331\",\"562408\",\"767634\",\"736557\",\"991007\",\"705504\",\"796956\",\"738474\",\"888346\",\"280549\",\"361594\",\"538841\",\"648373\"],\"linkPhone\":[\"\"],\"orgName\":\"公管办\",\"printTime\":\"2021-12-16T15:48:26.765\",\"projectName\":\"IQLZSSLJPL项目\",\"projectValidCode\":\"\"}";
//
//        String s = aes.simpleEncrypt(content, "5beead559ace53edc3e28449f8cfcf98");
//        System.out.println("密文：" + s);
//
//        String s1 = aes.simpleDecrypt(s, "5beead559ace53edc3e28449f8cfcf98");
//        System.out.println("明文：" + s1);
    }
}
